﻿using System.Web.Http;
using JasonSoft.ScriptAnnotations;
using WebActivatorEx;
using System.Web.Optimization;

[assembly: PostApplicationStartMethod(typeof($rootnamespace$.App_Start.ScriptAnnotations), "PreStart")]
namespace $rootnamespace$.App_Start
{
    public class ScriptAnnotations
    {
        public static void PreStart()
        {
            GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings.Converters.Add(new AnnotatedJsonConverter());

			var knockoutBundle = BundleTable.Bundles.GetBundleFor("~/bundles/knockout");
                
            if(knockoutBundle != null)
                knockoutBundle.Include("~/Scripts/scriptAnnotations.Knockout.js");
        }
    }
}